package xkp.lesson1;

import java.util.Scanner;

public class Demo2 {
	public static void main(String[] args) {
		A a = new A();
		//发现忘记了v的值，然后去猜
		System.out.println("请输入num的值");
		Scanner scanner = new Scanner(System.in);
		//从控制台获取值
		int num = scanner.nextInt();
		//设置num的值
		a.setNum(num);
		//开始猜
		while(!a.guess()) {
			num = scanner.nextInt();
			//设置num的值
			a.setNum(num);
		}
		
		
		scanner.close();
	}

}
